function openalert(txt, lisneter, parent,title) { var p = parent || 'body'; var bg = $(' ').appendTo(p); bg.css({ position: 'fixed', top: '0px', left: '0px', width: '100%', height: '100%', backgroundColor: "#000", opacity: 0 }); var rame = $('').appendTo(p); var ramedraw = rame.draw("xy",".head_t"); if ($.browser.msie) { if ($.browser.version == 7){ rame.css({ width: '300px' }); } else if ($.browser.version == 6){ $w = $(window); var s = $w.scrollTop(); rame.css({ width: '300px', position: 'absolute',top:($w.height() - rame.height()) / 2+s }); bg.css({ position: 'absolute', height: $w.height(), width: $w.width(),top:s}); $w.scroll(function () { var s = $w.scrollTop(); var t = ($w.height() - rame.height()) / 2 + s; bg.css({ top: s }); rame.css({ top: t }); }); } } rame.find(".head_t a.close").click(function () { close(); if (lisneter && typeof (lisneter.onclose) === 'function') lisneter.onclose(); }); rame.find(".footer a.ok").click(function () { close(); if (lisneter && typeof (lisneter.onok) === 'function') lisneter.onok(); }); rame.find(".footer a.cancel").click(function () { close(); if (lisneter && typeof (lisneter.oncancel) === 'function') lisneter.oncancel(); }); rame.find(".footer a.agree").click(function () { close(); if (lisneter && typeof (lisneter.onagree) === 'function') lisneter.onagree(); }); rame.find(".footer a.refuse").click(function () { close(); if (lisneter && typeof (lisneter.onrefuse) === 'function') lisneter.onrefuse(); }); if (lisneter && typeof (lisneter.oncancel) === 'function') { rame.find(".footer a.cancel").css({display:'inline-block'}); } if (lisneter && typeof (lisneter.onok) === 'function') { rame.find(".footer a.ok").css({display:'inline-block'}); } if (lisneter && typeof (lisneter.onagree) === 'function') { rame.find(".footer a.agree").css({display:'inline-block'}); } if (lisneter && typeof (lisneter.onrefuse) === 'function') { rame.find(".footer a.refuse").css({display:'inline-block'}); } if (lisneter && lisneter.noicon) { rame.css({ background: "#fff" }); rame.find('.content').css({ marginLeft: '0px' }); } var close = function (b) { ramedraw.unload(); rame.animate({ opacity: 0 }, function () { rame.remove(); }); bg.animate({ opacity: 0 }, function () { bg.remove(); }); }; var w = rame.width(); var h = rame.height(); rame.css({ marginLeft: "-" + w / 2 + 'px', marginTop: '-' + (h / 2 + 30) + 'px' }); if(parent){ var $parent = $(parent) $parent.css({position:'relative'}); bg.css({width:'100%',height:'100%',top:0,left:0,position:'absolute'}); rame.css({position:'absolute'}); } bg.animate({ opacity: 0.4 }, 300); rame.fadeIn(); rame.close = close; return rame;}/*弹出一个大面板*/function openpanel(title, selector, lisneter) { var bg = $(' ').appendTo("body"); bg.css({ position: 'fixed', top: '0px', left: '0px', width: '100%', height: '100%', backgroundColor: "#000", opacity: 0 }); var rame = $(' ').appendTo("body"); //var rameobj = rame.draw("xy",".head_t"); rame[0].id = rame[0].id + selector.substr(1); var content = $(selector); var parent = content.parent(); if (lisneter.hasLoad) { rame.children('.content').css('background', 'url(/images/openloading.gif) no-repeat center center'); content.css('visibility', 'hidden'); } rame.children('.content').append(content[0]); if($.browser.msie){ if($.browser.version == 7||$.browser.version == 8){ rame.css({width:content.width()+60+'px'}); } else if($.browser.version == 6){ $("body").css({height:'100%',width:'100%'}); bg.css({position:'absolute'}); rame.css({position:'absolute'}); rame.css({width:content.width()+60+'px'}); } } rame.find(".head_t a.close").click(function(){ close(); if(lisneter && typeof(lisneter.onclose) === 'function') lisneter.onclose(); }); rame.find(".footer a.ok").click(function(){ close(); if(lisneter && typeof(lisneter.onok) === 'function') lisneter.onok(); }); rame.find(".footer a.cancel").click(function(){ close(); if(lisneter && typeof(lisneter.oncancel) === 'function') lisneter.oncancel(); }); rame.find(".footer a.agree").click(function(){ close(); if(lisneter && typeof(lisneter.onagree) === 'function') lisneter.onagree(); }); rame.find(".footer a.refuse").click(function(){ close(); if(lisneter && typeof(lisneter.onrefuse) === 'function') lisneter.onrefuse(); }); if(lisneter && typeof(lisneter.oncancel) === 'function'){ rame.find(".footer a.cancel").css({display:'inline-block'}); } if(lisneter && typeof(lisneter.onok) === 'function'){ rame.find(".footer a.ok").css({display:'inline-block'}); } if(lisneter && typeof(lisneter.onagree) === 'function'){ rame.find(".footer a.agree").css({display:'inline-block'}); } if(lisneter && typeof(lisneter.onrefuse) === 'function'){ rame.find(".footer a.refuse").css({display:'inline-block'}); } if(lisneter && lisneter.noicon){ rame.css({background:"#fff"}); rame.find('.content').css({marginLeft:'0px'}); } var close = function (f) { //rameobj.unload(); if (content.attr("iframe") && content.attr("iframe") != '') content.empty(); parent.append(content); win.unbind('resize', resbox); bg.remove(); rame.remove(); /* rame.animate({opacity:0},function(){ parent.append(content); rame.remove(); if(typeof(f) == 'function') f(); }); bg.animate({opacity:0},function(){ bg.remove(); }); */ } var win = $(window); if (content.attr("iframe") && content.attr("iframe") != '') { var frameHeight = content.attr('frameHeight'); var src = content.attr("iframe"); content.empty(); src = src.indexOf("?") > 0 ? src + "&t=" + new Date : src + "?t=" + new Date(); content.append('